# RUN: llvm-mc -triple x86_64 --show-encoding %s | FileCheck %s
# RUN: not llvm-mc -triple i386 -show-encoding %s 2>&1 | FileCheck %s --check-prefix=ERROR

# ERROR-COUNT-60: error:
# ERROR-NOT: error:
# CHECK: {evex}	cmpnbexadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xe7,0x54,0x98,0x7b]
         {evex}	cmpnbexadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpnbexadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xe7,0x7c,0x98,0x7b]
         {evex}	cmpnbexadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpnbexadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xe7,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpnbexadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpnbexadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xe7,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpnbexadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmpbexadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xe6,0x54,0x98,0x7b]
         {evex}	cmpbexadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpbexadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xe6,0x7c,0x98,0x7b]
         {evex}	cmpbexadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpbexadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xe6,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpbexadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpbexadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xe6,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpbexadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmpbxadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xe2,0x54,0x98,0x7b]
         {evex}	cmpbxadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpbxadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xe2,0x7c,0x98,0x7b]
         {evex}	cmpbxadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpbxadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xe2,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpbxadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpbxadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xe2,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpbxadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmpzxadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xe4,0x54,0x98,0x7b]
         {evex}	cmpzxadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpzxadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xe4,0x7c,0x98,0x7b]
         {evex}	cmpzxadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpzxadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xe4,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpzxadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpzxadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xe4,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpzxadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmpnlxadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xed,0x54,0x98,0x7b]
         {evex}	cmpnlxadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpnlxadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xed,0x7c,0x98,0x7b]
         {evex}	cmpnlxadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpnlxadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xed,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpnlxadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpnlxadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xed,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpnlxadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmpnlexadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xef,0x54,0x98,0x7b]
         {evex}	cmpnlexadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpnlexadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xef,0x7c,0x98,0x7b]
         {evex}	cmpnlexadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpnlexadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xef,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpnlexadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpnlexadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xef,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpnlexadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmplexadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xee,0x54,0x98,0x7b]
         {evex}	cmplexadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmplexadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xee,0x7c,0x98,0x7b]
         {evex}	cmplexadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmplexadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xee,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmplexadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmplexadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xee,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmplexadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmplxadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xec,0x54,0x98,0x7b]
         {evex}	cmplxadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmplxadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xec,0x7c,0x98,0x7b]
         {evex}	cmplxadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmplxadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xec,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmplxadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmplxadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xec,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmplxadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmpnzxadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xe5,0x54,0x98,0x7b]
         {evex}	cmpnzxadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpnzxadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xe5,0x7c,0x98,0x7b]
         {evex}	cmpnzxadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpnzxadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xe5,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpnzxadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpnzxadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xe5,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpnzxadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmpnoxadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xe1,0x54,0x98,0x7b]
         {evex}	cmpnoxadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpnoxadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xe1,0x7c,0x98,0x7b]
         {evex}	cmpnoxadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpnoxadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xe1,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpnoxadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpnoxadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xe1,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpnoxadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmpnpxadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xeb,0x54,0x98,0x7b]
         {evex}	cmpnpxadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpnpxadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xeb,0x7c,0x98,0x7b]
         {evex}	cmpnpxadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpnpxadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xeb,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpnpxadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpnpxadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xeb,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpnpxadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmpnsxadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xe9,0x54,0x98,0x7b]
         {evex}	cmpnsxadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpnsxadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xe9,0x7c,0x98,0x7b]
         {evex}	cmpnsxadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpnsxadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xe9,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpnsxadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpnsxadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xe9,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpnsxadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmpoxadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xe0,0x54,0x98,0x7b]
         {evex}	cmpoxadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpoxadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xe0,0x7c,0x98,0x7b]
         {evex}	cmpoxadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpoxadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xe0,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpoxadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpoxadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xe0,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpoxadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmppxadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xea,0x54,0x98,0x7b]
         {evex}	cmppxadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmppxadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xea,0x7c,0x98,0x7b]
         {evex}	cmppxadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmppxadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xea,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmppxadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmppxadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xea,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmppxadd	%r19, %r23, 291(%r28,%r29,4)

# CHECK: {evex}	cmpsxadd	%ecx, %edx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf2,0x75,0x08,0xe8,0x54,0x98,0x7b]
         {evex}	cmpsxadd	%ecx, %edx, 123(%rax,%rbx,4)

# CHECK: {evex}	cmpsxadd	%r9, %r15, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x72,0xb5,0x08,0xe8,0x7c,0x98,0x7b]
         {evex}	cmpsxadd	%r9, %r15, 123(%rax,%rbx,4)

# CHECK: cmpsxadd	%r18d, %r22d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0x69,0x00,0xe8,0xb4,0xac,0x23,0x01,0x00,0x00]
         cmpsxadd	%r18d, %r22d, 291(%r28,%r29,4)

# CHECK: cmpsxadd	%r19, %r23, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8a,0xe1,0x00,0xe8,0xbc,0xac,0x23,0x01,0x00,0x00]
         cmpsxadd	%r19, %r23, 291(%r28,%r29,4)
